import request from '@/utils/request'

export function getRoles(params) {
  return request({
    url: '/adtor/roleshow',
    method: 'get',
    params
  })
}

export function addRole(data) {
  return request({
    url: '/adtor/crerole',
    method: 'post',
    data
  })
}

export function editRole(data) {
  return request({
    url: '/adtor/edtrole',
    method: 'post',
    data
  })
}

export function getNavPowers(params) {
  return request({
    url: '/adtor/navpow',
    method: 'get',
    params
  })
}

export function getRolePower(params) {
  return request({
    url: '/adtor/rolepow',
    method: 'get',
    params
  })
}

export function getAdmins(params) {
  return request({
    url: '/adtor/admshow',
    method: 'get',
    params
  })
}

export function addAdmin(data) {
  return request({
    url: '/adtor/creadm',
    method: 'post',
    data
  })
}

export function editAdmin(data) {
  return request({
    url: '/adtor/edtadm',
    method: 'post',
    data
  })
}

export function resetAdmin(data) {
  return request({
    url: '/adtor/resetadm',
    method: 'post',
    data
  })
}

export function statusAdmin(data) {
  return request({
    url: '/adtor/admstatus',
    method: 'post',
    data
  })
}
